﻿@model IEnumerable<shenkong.Models.Dorm>

@{
    ViewData["Title"] = "Index";
}
<link href="~/css/bgHome_index.css" rel="stylesheet" />
<form id="form1" runat="server">
    <div class="row">
        <div class="top">
            <img src="/images/logo.png" />
            <text>SDMS</text>
        </div>
        <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
            <a class="nav-link" id="home" data-toggle="pill" href="/bgHome" role="tab" aria-selected="true">首页</a>
            <a class="nav-link" id="building" href="/Buildings">
                <text class="iconfont icon-24gf-building2"></text>
                楼栋管理
            </a>
            <a class="nav-link  " href="/RepairRecords">
                <text class="iconfont icon-home"></text>
                宿舍报修管理
            </a>
            <a class="nav-link" href="/Students">
                <text class="iconfont icon-w_xuesheng-"></text>
                学生信息管理
            </a>
            <a class="nav-link" id="worker" href="#">
                <text class="iconfont icon-renyuan"></text>
                宿舍职员管理
            </a>
            <a class="nav-link" href="#">
                <text class="iconfont icon-shuidianmei"></text>
                宿舍水电管理
            </a>
            <a class="nav-link active" href="/Dorms">
                <text class="iconfont icon-baoxiu-xuanzhong"></text>
                宿舍信息管理
            </a>
            <a class="nav-link" id="warn" href="#">
                <text class="iconfont icon--zongjiandengji"></text>
                宿舍违纪管理
            </a>
            <a class="nav-link" href="#">
                <text class="iconfont icon-kehufangwen"></text>
                宿舍访问管理
            </a>

        </div>
    </div>
    <div class="main">
        <h1>宿舍信息管理</h1>

        <p>
            <a asp-action="Create">新建宿舍</a>
        </p>
        <table class="table">
            <thead>
                <tr>
                    <th>
                        楼栋名称
                    </th>
                    <th>
                        容纳人数
                    </th>
                    <th>
                        入住人数
                    </th>
                    <th>
                        宿舍类型
                    </th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
        @foreach (var item in Model) {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.BuilidingName)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.DormContain)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.Liver)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.DormClass)
                    </td>
                    <td>
                        <a asp-action="Edit" asp-route-id="@item.DormId">修改</a> |
                        <a asp-action="Details" asp-route-id="@item.DormId">详情</a> |
                        <a asp-action="Delete" asp-route-id="@item.DormId">删除</a>
                    </td>
                </tr>
        }
            </tbody>
        </table>
    </div>
</form>
